﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MethodWorx.CMS.Plugins;
using MethodWorx.CMS.Services;
using System.Web.Mvc;
using MethodWorx.CMS.Content;
using MethodWorx.CMS.UI.Application.ActionResults;

namespace MethodWorx.CMS.Workflow.CreateMember
{
    public class CreateMemberConfigurationController : WorkflowConfigurationController<CreateMemberConfiguration>
    {
        public CreateMemberConfigurationController(IdeExtension view, WorkflowService service) : base(view, service)
        {
        }

        protected override WorkflowConfigurationStep CreateNewWorkflowConfigurationStep(Guid id, string output)
        {
            return new WorkflowConfigurationStep()
            {
                CanConfigure = true,
                ComponentId = CreateMemberWorkflowComponent.ComponentId,
                Id = id,
                ComponentConfiguration = new CreateMemberConfiguration(),
                Output = output,
                OutputType = "Member"
            };
        }

        protected override void ReconfigureExistingStep(WorkflowConfigurationStep step, string output)
        {
            step.Output = output;
            step.OutputType = "Member";
            //base.ReconfigureExistingStep(step, output);
        }
    }
}
